package com.middlegroup.common;
 
import com.middlegroup.common.annotation.SensitiveField;
import com.middlegroup.common.annotation.SensitiveReflectionToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;


/**
 * demo
 */
public class MyEntity {
	
	/**
     * 证件号
     */
    @SensitiveField
    private String idNo;
 
    /**
     * 手机号
     */
    @SensitiveField(SensitiveField.SensitiveTypeEnum.MOBILE)
    private String mobile;
 
    /**
     * 姓名
     */
    @SensitiveField(SensitiveField.SensitiveTypeEnum.NAME)
    private String name;
    
    /**
     * 邮箱
     */
    @SensitiveField(SensitiveField.SensitiveTypeEnum.EMAIL)
    private String email;
 
	public String getIdNo() {
		return idNo;
	}
 
	public void setIdNo(String idNo) {
		this.idNo = idNo;
	}
 
	public String getMobile() {
		return mobile;
	}
 
	public void setMobile(String mobile) {
		this.mobile = mobile;
	}
 
	public String getName() {
		return name;
	}
 
	public void setName(String name) {
		this.name = name;
	}
    
	public String getEmail() {
		return email;
	}
 
	public void setEmail(String email) {
		this.email = email;
	}
 
	@Override
    public String toString() {
        return new SensitiveReflectionToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).toString();
    }

    public static void main(String[] args){
		MyEntity myEntity = new MyEntity();
		myEntity.setName("钱才");
		myEntity.setEmail("qinacai@live.cn");
		myEntity.setMobile("18317090970");
		myEntity.setIdNo("340823198909036711");
		System.out.println(myEntity.getName());
	}

}